using System;
using System.Data;

namespace DB
{
    public class DataBase
    {
        private DBAccessor accessor;
        public DataBase()
        {
            switch (Configurations.DB.DBType)
            {
                case "OLEDB":
                    accessor = new OLEDBAccessor();
                    break;
            }
        }
        public bool Find(string request, TableGenerator.TableGenerator tableType, ref DataTable result)
        {
            return accessor.Find(request, tableType, ref result);
        }
        public bool Add(string request)
        {
            return accessor.Add(request);
        }
        public bool Delete(string request)
        {
            return accessor.Delete(request);
        }
        public bool Modify(string request)
        {
            return accessor.Modify(request);
        }
        public bool Open()
        {
            return accessor.Open();
        }
        public void Close()
        {
            accessor.Close();
        }


    }
}
